home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14619 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: svnews.ubinet.ubs.com!ubszh!ian.johnston@ubs.com
  2. From: ian.johnston@ubs.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ experts only
  5. Date: 1 Apr 1996 10:39:39 GMT
  6. Organization: UBS
  7. Distribution: world
  8. Message-ID: <4jobpb$ka@ubszh.fh.zh.ubs.com>
  9. References: <4jhrb4$gk2@melon.myna.com>
  10. NNTP-Posting-Host: nol2179.fh.zh.ubs.com
  11.  
  12. In article <4jhrb4$gk2@melon.myna.com>, ckhan@myna.com (Colin Khna) writes:
  13. |> If you are such an expert, tell me why C++ is so great or not so great as 
  14. |> compared to Structured C.
  15.  
  16. Tell me, why is this Ford Mondeo with ABS, traction control, airbags,
  17. power windows, cruise control and a sunroof better than this Ford Mondeo
  18. without all those things?
  19.  
  20. C++ *is* structured C. (Or can pretend to be.)
  21.  
  22. Start with the easy things:
  23.  
  24. - stronger type checking
  25. - const enforcement
  26. - automatic variable initialisation
  27. - automatic variable destruction
  28. - inline functions
  29. - templates for code reuse
  30. - type safe I/O
  31.  
  32.  
  33. Some of the less obvious things:
  34.  
  35. - data encapsulation
  36. - inheritance for code reuse
  37. - inheritance for design reuse
  38. - flexibility of designs (virtual functions vs type switches)
  39.  
  40.  
  41. That's just off the top of my head.
  42.  
  43. Ian
  44.  
  45.